home *** CD-ROM | disk | FTP | other *** search
- /* Program name: CClasses (header)
- Author : Paul Gee
- Version : 0.1
- Date : 19th February 1993
- Purpose :
- */
-
- #include CNeoPersistNativeH
- #include <string.h>
-
- const NeoID kPersonID = 20;
- const NeoID kJokerID = 21;
- const NeoID kClownID = 22;
-
- class CPerson : public CNeoPersistNative
- {
- public:
- CPerson(char *aName = "", NeoID aID = 0);
- void printName(void) const;
- virtual void skill(void) const = 0;
-
- /** I/O Methods **/
- virtual void readObject(CNeoStream *aStream, const NeoTag aTag);
- virtual void writeObject(CNeoStream *aStream, const NeoTag aTag);
-
- protected:
- char fName[50];
- };
-
- enum { kPersonFileLength = kNeoPersistFileLength + 50};
-
- class CJoker : public CPerson
- {
- public:
- CJoker(char *aName = "", NeoID aID = 0);
-
- static CNeoPersist *New(void);
- virtual NeoID getClassID(void) const;
- virtual long getFileLength(void) const;
-
- /** I/O Methods **/
- virtual void readObject(CNeoStream *aStream, const NeoTag aTag);
- virtual void writeObject(CNeoStream *aStream, const NeoTag aTag);
-
- virtual void skill(void) const;
- void setJoke(const char *aJoke) {strncpy(fJoke, aJoke, sizeof(fJoke) -1);}
-
- protected:
- char fJoke[100];
- };
-
- enum { kJokerFileLength = kPersonFileLength + 100};
-
- class CClown : public CPerson
- {
- public:
- CClown(char *aName = "", NeoID aID = 0);
-
- static CNeoPersist *New(void);
- virtual NeoID getClassID(void) const;
- virtual long getFileLength(void) const;
-
- /** I/O Methods **/
- virtual void readObject(CNeoStream *aStream, const NeoTag aTag);
- virtual void writeObject(CNeoStream *aStream, const NeoTag aTag);
-
- virtual void skill(void) const;
- void setPieType(const char *aPieType) {strncpy(fPieType, aPieType, sizeof(fPieType) -1);}
-
- protected:
- char fPieType[80];
- };
-
- enum { kClownFileLength = kPersonFileLength + 80};
-